package com.example.music.room;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName = "user")
public class User {
    @PrimaryKey(autoGenerate = true)
    private int uid;

    @ColumnInfo(index = true)
    private String name;

    @ColumnInfo(name = "pass_word")
    private String passWord;

    private String tag;

    @ColumnInfo(name = "is_online")
    private Boolean isOnline;


    public User() {
    }

    @Ignore
    public User(String name, String passWord, String tag) {
        this.name = name;
        this.passWord = passWord;
        this.tag = tag;
        this.isOnline = false;
    }


    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Boolean getOnline() {
        return isOnline;
    }

    public void setOnline(Boolean online) {
        isOnline = online;
    }
}
